import React, {FC} from 'react';
import "./index.less";
import * as API from "@/services";

interface NewsDetailProps {
  record: API.FrontNews;
}

const NewsDetailComp: FC<NewsDetailProps> = (props) => {
  const {record} = props;
  return (
    <div className={"news-detail-container"}>
      <div className={"news-detail-header"}>
        <h2 className={"news-detail-title"}>
          {record.title}
        </h2>
        <div className={"news-detail-meta"}>
          <em className="news-publish-time">{record.openedTime}</em>
        </div>
      </div>
      <div className={"news-detail-content"} dangerouslySetInnerHTML={{__html: record.content || ""}}/>
    </div>
  );
};

export default NewsDetailComp;
